package stu.wingsmaker.artofsubway.view;

import java.util.ArrayList;

import stu.wingsmaker.artofsubway.R;
import stu.wingsmaker.artofsubway.model.ConcertListData;
import stu.wingsmaker.artofsubway.model.adapter.ConcertListAdapter;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import com.actionbarsherlock.app.SherlockFragment;

public class ConcertListFragment extends SherlockFragment {
	private ListView concertListview;
	
	private ArrayList<ConcertListData> Array_Data;
	private ConcertListData data;
	private ConcertListAdapter adapter;
	

	@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		View root = inflater.inflate(R.layout.concertlist_fragment, container, false);
		
		Array_Data = new ArrayList<ConcertListData>();
        data = new ConcertListData(R.drawable.ic_launcher, "1번째 글입니다",
                "첫번째글 부제목입니다^^");
        Array_Data.add(data);
        data = new ConcertListData(R.drawable.abs__ab_bottom_solid_light_holo, "2번째 글입니다",
                "두번째글 부제목입니다^^"); 
        Array_Data.add(data);
//        concertListview = (ListView) container.fin
        concertListview = (ListView) root.findViewById(R.id.concertList);
        
        adapter = new ConcertListAdapter(getActivity(), R.layout.concert_listview, Array_Data);
            /// 어뎁터 CustomListView설정
        concertListview.setAdapter(adapter);
        return root;
    }
}
